<?php
    if(isset($_GET['class'])){
        include_once "./include/dbclass.php";
        include "function.php";
        $class=$_GET['class'];
        $classid=getClass_id($class);
        if($classid==0){
            header("location: index.php");
            exit;
        }else{
            $results['0']=getContent($classid);
            $sql1='SELECT * FROM `article` WHERE class_id = 2 ORDER BY date DESC limit 10';
            $db=new DB();
            $results['1']=$db->getall($sql1);
//            var_dump($results);
            include "./tpl/list.php";
        }
    }else{
        header("location: index.php");
        exit;
    }